import { createPinia } from 'pinia'

import app from './app'
import user from './user'

// 注入所有pinia模块
const modules = {
  app,
  user
}

export default (name) => {
  return modules[name]()
}

export function initPinia() {
  const pinia = createPinia()
  return pinia
}
